Yahoo Ads: Migrate to OpenRTB 2.6#4521
Open
MananRPatel wants to merge 5 commits into
Open
Conversation
added 2 commits
May 29, 2026 14:32
Bump the x-openrtb-version header from 2.5 to 2.6 and stop down-converting the auction request inside the bidder. The bidder now passes the 2.6 request through, relying on the PBS-Java up-converter to normalize gdpr, us_privacy, consent, eids, schain and rwdd to their 2.6 top-level slots. For the three privacy/regulatory fields that neither converter handles (gpp, gpp_sid, coppa), add ext->top promotion in modifyRegs: read the 2.6 top-level value, falling back to the legacy 2.5 regs.ext property, and strip the promoted keys from ext. Typed ext-only fields (gpc, dsa) and any other ext properties are preserved. No cattax default is synthesized. Remove the now-unused BidRequestOrtbVersionConversionManager dependency from the bidder and its Spring configuration. Update unit tests for the 2.6 wire shape and add coverage for the ext->top promotion, mixed publisher shapes, wrong-type ext guards, and the no-ext short-circuit. Update the integration fixture to the 2.6 wire shape.
Make stripPromotedFromExt remove a regs.ext key only when its value was actually promoted to top-level (resolved value non-null). A malformed, non-promotable value (e.g. a non-textual gpp) is now left untouched in regs.ext instead of being dropped when a sibling field triggers the rebuild. Add a test covering the mixed case (valid coppa promoted, malformed gpp kept in ext) and trim redundant comments.
added 3 commits
June 1, 2026 14:43
resolveGppSid now promotes regs.ext.gpp_sid only when every element is an integer. If any element is non-integral the whole array is left in regs.ext untouched rather than promoting a filtered subset, matching the gpp and coppa handling so no value is silently dropped. Adds a test for the mixed-array case.
Restructure the regs handling so a single per-field signal decides both the promotion and the ext strip. A field is promoted only when it is absent at top-level and present and well-formed in ext; a key is removed from regs.ext if and only if that field was promoted. This removes the previous dependency on whether a sibling field triggered the rebuild (e.g. a value present at both top-level and in ext is now handled the same regardless of siblings). Rename for clarity: modifyRegs -> promoteRegsExtToTopLevel, resolveX -> xToPromote (return the value to lift or null), stripPromotedFromExt -> removePromotedKeys. Add a test for the same field present at both top-level and ext.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔧 Type of changes
Migrates the Yahoo Ads bidder (and its
yssp/yahoossp/yahooAdvertisingaliases) from OpenRTB 2.5 to OpenRTB 2.6 on the wire. Three changes, in the
bidder and its Spring config:
x-openrtb-version: 2.5→2.6insrc/main/java/org/prebid/server/bidder/yahooads/YahooAdsBidder.java.request back to 2.5 before serializing it
(
conversionManager.convertFromAuctionSupportedVersion(bidRequest, OrtbVersion.ORTB_2_5)).That call is removed, along with the now-unused
BidRequestOrtbVersionConversionManagerdependency in the bidder and itsYahooAdsConfiguration.regs.{gpp, gpp_sid, coppa}. The oldmodifyRegs/resolveExtRegsblock re-buried these (and gdpr/us_privacy)into
regs.ext. It is replaced withpromoteRegsExtToTopLevel: a field ispromoted only when it is absent at top-level and present and well-formed in
regs.ext, and a key is removed fromregs.extif and only if that fieldwas promoted. Typed ext-only fields (
gpc,dsa), unknownregs.extproperties, a value already present at top-level, and any of the three that
could not be promoted (e.g. a malformed, non-textual
gpp, or agpp_sidarray with a non-integer element) are all left in
regs.extuntouched, sono value is silently dropped. The strip decision uses a single per-field
signal, so it does not depend on whether a sibling field triggered the
rebuild.
No publisher-facing config change is required bidder params (
dcn,pos) areunchanged, and
bidder-config/yahooAds.yamlalready declaredortb-version: "2.6".Why
PBS-Java core up-converts every incoming request to its canonical 2.6 form
(
BidRequestOrtb25To26Converter) before bidders run. The Yahoo bidder thenexplicitly down-converted that back to 2.5 and re-buried
gpp/gpp_sid/coppaintoregs.ext, and sentx-openrtb-version: 2.5.Net effect: even fully 2.6-aware publishers had privacy/addressability fields
buried in
.exton the wire.Removing the in-bidder down-conversion lets core's existing promotion reach the
wire. The new
promoteRegsExtToTopLeveladditionally promotes the threeregulatory fields that neither converter handles.
regs.gdpr,regs.us_privacyregs.ext.*Regsuser.consent,user.eidsuser.ext.*Usersource.schainsource.ext.schainSourceimp.rwddimp.ext.prebid.is_rewarded_inventoryImpregs.gpp,regs.gpp_sidregs.ext.*Regsregs.copparegs.ext.coppa(legacy)RegsWhat this means for publishers
regs.gpptop-level).ext; header was2.52.6.exton the wiregdpr,us_privacy,consent,eids,schain,rwdd; the bidder additionally promotesgpp,gpp_sid,coppa; everything else passes through in.extNon-regulatory 2.6 fields the bidder does not transform (e.g.
device.sua,user.kwarray,site/app.inventorypartnerdomain,content.network,content.channel) pass through in whatever shape the publisher sent.What changed
src/main/java/org/prebid/server/bidder/yahooads/YahooAdsBidder.javasrc/main/java/org/prebid/server/spring/config/bidder/YahooAdsConfiguration.javasrc/test/java/org/prebid/server/bidder/yahooads/YahooAdsBidderTest.javasrc/test/resources/org/prebid/server/it/openrtb2/yahooads/test-yahooads-bid-request.jsonYahooAdsBidder.javabumps the header literal, removes the down-converter calland dependency, and replaces the regs re-bury logic with
promoteRegsExtToTopLevel+gppToPromote/gppSidToPromote/coppaToPromote(each returns the value to lift, or null) andremovePromotedKeys. The helpers operate on atoBuilder()copy ofRegs(the bidder already rebuilds the request per-impression), so they cannot affect
the request other bidders see.
Test plan
Automated
mvn test -Dtest=YahooAdsBidderTest29 unit tests pass. New cases cover:ext→top promotion, mixed publisher shapes (some fields top-level, some in
ext), wrong-typed
regs.extvalues (no promotion), a malformed value left inext while a sibling field promotes, a
gpp_sidarray with a non-integerelement left in ext untouched, the same field present at both top-level and
ext (ext copy left untouched), and the no-
extshort-circuit.mvn test -Dtest=YahooAdsTestintegration test passes against theupdated 2.6 wire fixture.
End-to-end against the Yahoo Ads SSP
A build of this branch was run as a local PBS-Java process (not Docker) and
pointed at the Yahoo Ads SSP endpoint. For each scenario a request was POSTed to
/openrtb2/auctionwithext.prebid.debug: 1, and the exact bytes the bidderput on the wire were read back from
ext.debug.httpcalls.yahooAds[*](requestbody + headers). Every outbound carried
x-openrtb-version: 2.6and the SSPreturned HTTP 200. Bid presence varies with demand and is not asserted here.
regs.gpp/regs.gpp_sid/regs.coppapromoted to top-level and removed fromregs.ext; core-promoted fields (gdpr,us_privacy) at top-level; unrelatedregs.extkeys (gpc,dsa) left inregs.extplcmt=2andplcmt=4podid,podseq,slotinpod,maxseq,poddur,mincpmpersec,rqddurs) intactapp.idoverride applied (same mechanism assite.id); 2.6 wireHow to verify locally
Test fixture changes
test-yahooads-bid-request.json(integration): expected outbound now carriesregs.gpp/regs.gpp_sid/regs.gdprat top-level (previously underregs.ext).YahooAdsBidderTest.java: header assertion2.5→2.6; the"remove/overwrite regs ext" tests are replaced with promotion + passthrough
tests described above.
Backward compatibility
No breaking changes.
dcn,pos) unchanged.makeBids) unchanged.gpp/gpp_sid/coppaat top-level; all other fields pass through unchanged in.ext.Aliases
yssp,yahoosspandyahooAdvertisingare declared as aliases ofyahooAdsin
bidder-config/yahooAds.yamland share the sameYahooAdsBidderinstance,so all alias codes send the 2.6 wire after this PR.
For contact: prebid-tech-team@yahooinc.com
Implemented with assistance from Claude Code.